// 导入本地PNG图片
import Styles from './index.module.less'; // 引入模块化样式
import React from 'react';
import { View, Button } from '@ray-js/ray';
import Strings from '@/i18n';
// 图标按钮行组件
export function BottomComfimView({ onSave, onCancle }) {

    return (
        <View
            style={{
                display: 'flex',
                flexDirection: 'column',
                width: '100%',
                height: 'auto',
                position: 'absolute',
                bottom: 0,
            }}
        >
            <View className={Styles.line} />
            <View style={{ display: 'flex', flexDirection: 'row', height: '120rpx' }}>
                <Button
                    onClick={(e)=>{
                        onCancle()
                        console.log('点击了取消112')
                    }}
                    style={{
                        flex: 1,
                        color: 'white',
                        backgroundColor: 'rgba(0, 0, 0, 0)',
                        fontSize: '18px',
                        height: '100%',
                        textAlign: 'center',
                        fontWeight: 'inherit',
                    }}
                >
                    {Strings.getLang('m_cancel')}
                </Button>
                <Button
                    onClick={() => {
                        console.log('点击了保存112')
                        onSave() //加函数括号才是函数的调用，不加括号就只是函数引用
                    }}
                    style={{
                        flex: 1,
                        color: 'white',
                        backgroundColor: 'rgba(0, 0, 0, 0)',
                        fontSize: '18px',
                        height: '100%',
                        textAlign: 'center',
                        fontWeight: 'inherit',
                    }}
                >
                     {Strings.getLang('m_save')}
                </Button>
            </View>
        </View>
    );
}
export default BottomComfimView;


